<?php
require_once("../../bbs/model/conn.php");
/**
 * 获取所有评论信息
 * @return array
 */
function get_all_reply_info()
{
  $sql = "select r.replyId,u.uId,u.head,u.uName,t.title,r.publishTime,r.content from tbl_reply r,tbl_user u,tbl_topic t where r.uId = u.uId and r.topicId = t.topicId";
  $result = exec_select($sql);
  return $result;
}
/**
 * 删除评论
 * @param $replyId
 * @return bool
 */
function delete_reply($replyId)
{
  $sql = "delete from tbl_reply where replyId = $replyId";
  return exec_update($sql);
}
?>